<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- editormd CSS文件 -->
    <link rel="stylesheet" href="{{ url_for('static',filename='bi_ji/editormd/css/editormd.css') }}" />
    <!-- editormd JS相关文件 -->
    <script src="{{ url_for('static',filename='bi_ji/js/jquery.min.js') }}"></script>
    <script src="{{ url_for('static',filename='bi_ji/editormd/editormd.min.js') }}"></script>

</head>

<body>
    <form name="mdEditorForm" action='/bi_ji/save' method='post'>
        <div style='height: 40px;padding: 5px; text-align: center;'>
            标题： <input type="text" name="title" style='height:30px;width:390px;' value="{{md_tilte}}">
            &nbsp;&nbsp;&nbsp;&nbsp;<button id='confirmButton'>发布文章</button>
        </div>
        <!-- 文章的主体内容 textarea -->
        <div id="article-content">
            <textarea name="content" id="content" style="display:none;">{{md_text}}</textarea>
        </div>
    </form>

</body>
<script type="text/javascript">
    var testEditor;
    $(function () {
        testEditor = editormd("article-content", {
            width: "90%",
            height: 640,
            syncScrolling: "single",
            path: "{{ url_for('static',filename='bi_ji/editormd/lib/') }}",// 自动加载模块地址

            imageUpload: true,//是否开启图片上传功能
            imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],//允许上传的图片格式
            imageUploadURL: "/bi_ji/upload_img",//图片上传调用的后端功能
        });
    });
</script>

</html>